1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a program. More particularly, the present invention relates to an image processing technique for converting an m-value image into an n-value image.
2. Description of the Related Art
Conventionally, image processing apparatuses for converting input continuous tone image data into binary image data and outputting the data have used, for example, an error diffusion method as a method for converting the continuous tone image into the binary image. The error diffusion method is a method for diffusing a difference (quantization error) between a gradation value of a target pixel and a binarized quantization representative value into gradation values of neighbor pixels of the target pixel, and sequentially binarizing each gradation value (see, R. Floyd, L. Steinberg, “An Adaptive Algorithm for Spatial Gray scale”, Proceeding of the S.I.D., vol 17/2, 1976, p. 75-76).
In the image processing for converting a continuous tone image into a binary image, as the increase in resolutions of images in recent years, the data amounts have also increased. Thus, an increase in memory sizes and an increase in processing time have become an issue. To cope with the issue, a continuous tone image to be processed is divided into a plurality of regions in advance so as to reduce the size of the memory and to increase a processing speed by parallel processing. In such a method, the images are binarized by sequential processing or parallel processing for each divided region, and after the processing, the divided images in each region are joined.
However, in a case where the each divided image is processed in parallel by the error diffusion method, an error cannot be correctly propagated to the divided images of the adjacent regions beyond the boundary between the regions. Accordingly, when each divided image is joined, discontinuity of dot patterns (texture) appears in the joint part. The discontinuity dots can be easily noticed like a streak, and the image quality is largely impaired. Such a streak may appear when two or more different binarization methods are applied to one image. For example, if one image is divided into two regions, one of the regions is quantized using the error diffusion method, and the other region is quantized using a dither method, a dot pattern appears discontinuously at the boundary of the regions, and thus the discontinuity of the dot pattern can be easily noticed as a streak.
Against such a background, Japanese Patent Application Laid-Open No. 6-301364 discusses a method for dividing an input image to be processed into a plurality of regions, and performing the error diffusion processing to each region with contrivance in the error diffusion to pixels adjacent to a boundary line. With the technique, an attempt of reducing the appearance of the streak in the join part in the image has been made. Further, Japanese Patent Application Laid-Open No. 11-17945 discusses an attempt to prevent the decrease in the image quality in the join part of the image by processing further adjacent regions by delaying at least one line or more, and diffusing an error of pixels adjacent to the boundary line into pixels in a neighbor region on which the processing has not been performed yet. In Japanese Patent No. 4039395, before an image to be processed is divided, error diffusion processing is performed on each pixel on a division line, and an error is diffused into two regions across the division line. Then, the error diffusion processing is performed on each divided region.
In the methods discussed in Japanese Patent Application Laid-Open No. 6-301364 and Japanese Patent Application Laid-Open No. 11-17945, since the error propagation between the regions in the border part is approximate propagation, the visibility of the streak in the join part of the image can be reduced, however, the streak cannot be completely removed. Further, in the method discussed in Japanese Patent No. 4039395, a diffusion direction and a diffusion coefficient different from the other regions are used on the division line. Therefore, the dot pattern in the boundary part is different from those in the other regions, and this can be seen as a streak.